package drds.global_transaction.api.message_codec;

import java.io.Serializable;

public class HeartbeatMessage implements Serializable
{
	private static final long serialVersionUID = -985316399527884899L;
	public static HeartbeatMessage ping = new HeartbeatMessage(true);
	public static HeartbeatMessage pong = new HeartbeatMessage(false);
	private boolean pingOrPong = true;

	private HeartbeatMessage(boolean pingOrPong)
	{
		this.pingOrPong = pingOrPong;
	}

	@Override
	public String toString()
	{
		return this.pingOrPong ? "ping" : "pong";
	}
}
